package io.charStream;
import java.io.*;
public class FileHanzi {
	public static void main(String[] args) {
		RandomAccessFile in = null;
		try {
			in =new RandomAccessFile("hanzi.txt","rw");
			long length=in.length();
			long position=0;
			in.seek(position);
			while(position<length) {
				String str=in.readLine();
				byte b[]= str.getBytes("iso-8859-1");
				str = new String(b);
				//str = new String(b,"GB2312");
				position = in.getFilePointer();
				System.out.println(str);
			}
			in.close();
		}catch(IOException e) {
			e.getMessage();
		}
	}

}
